class Person{
  String? name= "张三";
  int? age= 18;
  String? sex= "男";
  // 定义构造函数
  // Person({String? name,int? age,String? sex}){
  //   this.name=name??this.name;
  //   this.age=age??this.age;
  //   this.sex=sex??this.sex;
  // }
  //构造函数的语法糖
  Person({this.name,this.age,this.sex});
  void _sayHello(){
    print("你好，我是$name");
  }

}